home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / rdf / nsIRDFObserver.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  10KB  |  213 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIRDFObserver.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIRDFObserver_h__
  6. #define __gen_nsIRDFObserver_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsIRDFResource_h__
  14. #include "nsIRDFResource.h"
  15. #endif
  16.  
  17. #ifndef __gen_nsIRDFNode_h__
  18. #include "nsIRDFNode.h"
  19. #endif
  20.  
  21. /* For IDL files that don't want to include root IDL files. */
  22. #ifndef NS_NO_VTABLE
  23. #define NS_NO_VTABLE
  24. #endif
  25. class nsIRDFDataSource; /* forward declaration */
  26.  
  27.  
  28. /* starting interface:    nsIRDFObserver */
  29. #define NS_IRDFOBSERVER_IID_STR "3cc75360-484a-11d2-bc16-00805f912fe7"
  30.  
  31. #define NS_IRDFOBSERVER_IID \
  32.   {0x3cc75360, 0x484a, 0x11d2, \
  33.     { 0xbc, 0x16, 0x00, 0x80, 0x5f, 0x91, 0x2f, 0xe7 }}
  34.  
  35. class NS_NO_VTABLE nsIRDFObserver : public nsISupports {
  36.  public: 
  37.  
  38.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRDFOBSERVER_IID)
  39.  
  40.   /**
  41.      * This method is called whenever a new assertion is made
  42.      * in the data source
  43.      * @param aDataSource the datasource that is issuing
  44.      *   the notification.
  45.      * @param aSource the subject of the assertion
  46.      * @param aProperty the predicate of the assertion
  47.      * @param aTarget the object of the assertion
  48.      */
  49.   /* void onAssert (in nsIRDFDataSource aDataSource, in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
  50.   NS_IMETHOD OnAssert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) = 0;
  51.  
  52.   /**
  53.      * This method is called whenever an assertion is removed
  54.      * from the data source
  55.      * @param aDataSource the datasource that is issuing
  56.      *   the notification.
  57.      * @param aSource the subject of the assertion
  58.      * @param aProperty the predicate of the assertion
  59.      * @param aTarget the object of the assertion
  60.      */
  61.   /* void onUnassert (in nsIRDFDataSource aDataSource, in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
  62.   NS_IMETHOD OnUnassert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) = 0;
  63.  
  64.   /**
  65.      * This method is called when the object of an assertion
  66.      * changes from one value to another.
  67.      * @param aDataSource the datasource that is issuing
  68.      *   the notification.
  69.      * @param aSource the subject of the assertion
  70.      * @param aProperty the predicate of the assertion
  71.      * @param aOldTarget the old object of the assertion
  72.      * @param aNewTarget the new object of the assertion
  73.      */
  74.   /* void onChange (in nsIRDFDataSource aDataSource, in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aOldTarget, in nsIRDFNode aNewTarget); */
  75.   NS_IMETHOD OnChange(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget) = 0;
  76.  
  77.   /**
  78.      * This method is called when the subject of an assertion
  79.      * changes from one value to another.
  80.      * @param aDataSource the datasource that is issuing
  81.      *   the notification.
  82.      * @param aOldSource the old subject of the assertion
  83.      * @param aNewSource the new subject of the assertion
  84.      * @param aProperty the predicate of the assertion
  85.      * @param aTarget the object of the assertion
  86.      */
  87.   /* void onMove (in nsIRDFDataSource aDataSource, in nsIRDFResource aOldSource, in nsIRDFResource aNewSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
  88.   NS_IMETHOD OnMove(nsIRDFDataSource *aDataSource, nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) = 0;
  89.  
  90.   /**
  91.      * This method is called when a datasource is about to
  92.      * send several notifications at once. The observer can
  93.      * use this as a cue to optimize its behavior. The observer
  94.      * can expect the datasource to call endUpdateBatch() when
  95.      * the group of notifications has completed.
  96.      * @param aDataSource the datasource that is going to
  97.      *   be issuing the notifications.
  98.      */
  99.   /* void onBeginUpdateBatch (in nsIRDFDataSource aDataSource); */
  100.   NS_IMETHOD OnBeginUpdateBatch(nsIRDFDataSource *aDataSource) = 0;
  101.  
  102.   /**
  103.      * This method is called when a datasource has completed
  104.      * issuing a notification group.
  105.      * @param aDataSource the datasource that has finished
  106.      *   issuing a group of notifications
  107.      */
  108.   /* void onEndUpdateBatch (in nsIRDFDataSource aDataSource); */
  109.   NS_IMETHOD OnEndUpdateBatch(nsIRDFDataSource *aDataSource) = 0;
  110.  
  111. };
  112.  
  113. /* Use this macro when declaring classes that implement this interface. */
  114. #define NS_DECL_NSIRDFOBSERVER \
  115.   NS_IMETHOD OnAssert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget); \
  116.   NS_IMETHOD OnUnassert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget); \
  117.   NS_IMETHOD OnChange(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget); \
  118.   NS_IMETHOD OnMove(nsIRDFDataSource *aDataSource, nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget); \
  119.   NS_IMETHOD OnBeginUpdateBatch(nsIRDFDataSource *aDataSource); \
  120.   NS_IMETHOD OnEndUpdateBatch(nsIRDFDataSource *aDataSource); 
  121.  
  122. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  123. #define NS_FORWARD_NSIRDFOBSERVER(_to) \
  124.   NS_IMETHOD OnAssert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { return _to OnAssert(aDataSource, aSource, aProperty, aTarget); } \
  125.   NS_IMETHOD OnUnassert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { return _to OnUnassert(aDataSource, aSource, aProperty, aTarget); } \
  126.   NS_IMETHOD OnChange(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget) { return _to OnChange(aDataSource, aSource, aProperty, aOldTarget, aNewTarget); } \
  127.   NS_IMETHOD OnMove(nsIRDFDataSource *aDataSource, nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { return _to OnMove(aDataSource, aOldSource, aNewSource, aProperty, aTarget); } \
  128.   NS_IMETHOD OnBeginUpdateBatch(nsIRDFDataSource *aDataSource) { return _to OnBeginUpdateBatch(aDataSource); } \
  129.   NS_IMETHOD OnEndUpdateBatch(nsIRDFDataSource *aDataSource) { return _to OnEndUpdateBatch(aDataSource); } 
  130.  
  131. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  132. #define NS_FORWARD_SAFE_NSIRDFOBSERVER(_to) \
  133.   NS_IMETHOD OnAssert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAssert(aDataSource, aSource, aProperty, aTarget); } \
  134.   NS_IMETHOD OnUnassert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnUnassert(aDataSource, aSource, aProperty, aTarget); } \
  135.   NS_IMETHOD OnChange(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnChange(aDataSource, aSource, aProperty, aOldTarget, aNewTarget); } \
  136.   NS_IMETHOD OnMove(nsIRDFDataSource *aDataSource, nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMove(aDataSource, aOldSource, aNewSource, aProperty, aTarget); } \
  137.   NS_IMETHOD OnBeginUpdateBatch(nsIRDFDataSource *aDataSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnBeginUpdateBatch(aDataSource); } \
  138.   NS_IMETHOD OnEndUpdateBatch(nsIRDFDataSource *aDataSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnEndUpdateBatch(aDataSource); } 
  139.  
  140. #if 0
  141. /* Use the code below as a template for the implementation class for this interface. */
  142.  
  143. /* Header file */
  144. class nsRDFObserver : public nsIRDFObserver
  145. {
  146. public:
  147.   NS_DECL_ISUPPORTS
  148.   NS_DECL_NSIRDFOBSERVER
  149.  
  150.   nsRDFObserver();
  151.  
  152. private:
  153.   ~nsRDFObserver();
  154.  
  155. protected:
  156.   /* additional members */
  157. };
  158.  
  159. /* Implementation file */
  160. NS_IMPL_ISUPPORTS1(nsRDFObserver, nsIRDFObserver)
  161.  
  162. nsRDFObserver::nsRDFObserver()
  163. {
  164.   /* member initializers and constructor code */
  165. }
  166.  
  167. nsRDFObserver::~nsRDFObserver()
  168. {
  169.   /* destructor code */
  170. }
  171.  
  172. /* void onAssert (in nsIRDFDataSource aDataSource, in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
  173. NS_IMETHODIMP nsRDFObserver::OnAssert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
  174. {
  175.     return NS_ERROR_NOT_IMPLEMENTED;
  176. }
  177.  
  178. /* void onUnassert (in nsIRDFDataSource aDataSource, in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
  179. NS_IMETHODIMP nsRDFObserver::OnUnassert(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
  180. {
  181.     return NS_ERROR_NOT_IMPLEMENTED;
  182. }
  183.  
  184. /* void onChange (in nsIRDFDataSource aDataSource, in nsIRDFResource aSource, in nsIRDFResource aProperty, in nsIRDFNode aOldTarget, in nsIRDFNode aNewTarget); */
  185. NS_IMETHODIMP nsRDFObserver::OnChange(nsIRDFDataSource *aDataSource, nsIRDFResource *aSource, nsIRDFResource *aProperty, nsIRDFNode *aOldTarget, nsIRDFNode *aNewTarget)
  186. {
  187.     return NS_ERROR_NOT_IMPLEMENTED;
  188. }
  189.  
  190. /* void onMove (in nsIRDFDataSource aDataSource, in nsIRDFResource aOldSource, in nsIRDFResource aNewSource, in nsIRDFResource aProperty, in nsIRDFNode aTarget); */
  191. NS_IMETHODIMP nsRDFObserver::OnMove(nsIRDFDataSource *aDataSource, nsIRDFResource *aOldSource, nsIRDFResource *aNewSource, nsIRDFResource *aProperty, nsIRDFNode *aTarget)
  192. {
  193.     return NS_ERROR_NOT_IMPLEMENTED;
  194. }
  195.  
  196. /* void onBeginUpdateBatch (in nsIRDFDataSource aDataSource); */
  197. NS_IMETHODIMP nsRDFObserver::OnBeginUpdateBatch(nsIRDFDataSource *aDataSource)
  198. {
  199.     return NS_ERROR_NOT_IMPLEMENTED;
  200. }
  201.  
  202. /* void onEndUpdateBatch (in nsIRDFDataSource aDataSource); */
  203. NS_IMETHODIMP nsRDFObserver::OnEndUpdateBatch(nsIRDFDataSource *aDataSource)
  204. {
  205.     return NS_ERROR_NOT_IMPLEMENTED;
  206. }
  207.  
  208. /* End of implementation class template. */
  209. #endif
  210.  
  211.  
  212. #endif /* __gen_nsIRDFObserver_h__ */
  213.